//##############################################################################
//#    CuteWebshot is an application which can be used to render
//#    screenshots from webpages.
//#
//#    Copyright (C) 2010  Juhapekka Piiroinen
//#
//#    This program is free software: you can redistribute it and/or modify
//#    it under the terms of the GNU General Public License as published by
//#    the Free Software Foundation, either version 3 of the License, or
//#    (at your option) any later version.
//#
//#    This program is distributed in the hope that it will be useful,
//#    but WITHOUT ANY WARRANTY; without even the implied warranty of
//#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//#    GNU General Public License for more details.
//#
//#    You should have received a copy of the GNU General Public License
//#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
//#############################################################################
//# Contact: juhapekka.piiroinen@gmail.com
//#############################################################################
#ifndef COMMON_H
#define COMMON_H

#include <QDebug>

#define DEF_TARGET_PATH "TargetPath"
#define DEF_APPLICATION_TITLE "CuteWebshot"
#define DEF_SKIP_IF_RENDERED "SkipIfAlreadyRendered"

/* Debugging */
#define FUNC_IN  qDebug()   << __FILE__ << ":" <<  __LINE__ << ">>"     << __PRETTY_FUNCTION__
#define FUNC_OUT qDebug()   << __FILE__ << ":" <<  __LINE__ << "<<"     << __PRETTY_FUNCTION__
#define FAIL     qWarning() << __FILE__ << ":" <<  __LINE__ << " /!\\ "
#define DEBUG    qDebug()   << __FILE__ << ":" <<  __LINE__ << "  "

#define SECOND 1000
#define MINUTE 60*SECOND
#define MAX_RENDERING_TIME 3*MINUTE
#define KILL_SWITCH_TIMEOUT MAX_RENDERING_TIME+5

#ifdef DEBUG
 // lets exit after qWarning
 // more info: http://doc.qt.nokia.com/4.7/debug.html
 #define  QT_FATAL_WARNINGS
#endif

#endif // COMMON_H
